package sk.tuke.lara.masplc.agents;

import java.util.ArrayList;
import java.util.List;

/**
 * Data Transfer Object - pro prenos informaci o PLC agentech a jejich STAVU
 * @author MAR
 *
 */
public class PlcAgentDTO implements Comparable<PlcAgentDTO> {
    private String name;
    private int maxVykon;
    private List<ConstraintsDTO> constraints = new ArrayList<ConstraintsDTO>();
    private int pozadovanyVykon;
    private int priority = 0;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMaxVykon() {
        return maxVykon;
    }

    public void setMaxVykon(int maxVykon) {
        this.maxVykon = maxVykon;
    }

    public List<ConstraintsDTO> getConstraints() {
        return constraints;
    }

    public void setConstraints(List<ConstraintsDTO> constraints) {
        this.constraints = constraints;
    }

    public void setPozadovanyVykon(int i) {
        this.pozadovanyVykon = i;
    }

    public int getPozadovanyVykon() {
        return pozadovanyVykon;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public int getPriority() {
        return priority;
    }

    @Override
    public int compareTo(PlcAgentDTO o) {
        return o.getPriority() - this.priority;
    }

}
